/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package presentation.view;

import javax.swing.JPanel;

/**
 *
 * @author Joanna 8a
 */
public class PanelCrearHorario extends javax.swing.JPanel {

    /**
     * Creates new form PanelCrearHorario
     */
    public PanelCrearHorario(FramePrincipal parent, JPanel predecesor) {
        initComponents();
        this.parent = parent;
        this.predecesor = predecesor;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        try {
            buttonGroup_GruposDisponibles =(javax.swing.ButtonGroup)java.beans.Beans.instantiate(getClass().getClassLoader(), "presentation/view.PanelHorario_buttonGroupHorariosDisponibles");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (java.io.IOException e) {
            e.printStackTrace();
        }
        jScrollPaneCrearHorario = new javax.swing.JScrollPane();
        jTableCrearHorario = new javax.swing.JTable();
        jButtonCrearHorario = new javax.swing.JButton();
        jButton_Volver = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        jList_Materias = new javax.swing.JList();
        jRadioButton1 = new javax.swing.JRadioButton();
        jRadioButton2 = new javax.swing.JRadioButton();
        jRadioButton3 = new javax.swing.JRadioButton();

        setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Crear Horario", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Segoe UI Light", 1, 14), new java.awt.Color(102, 0, 102))); // NOI18N

        jTableCrearHorario.setFont(new java.awt.Font("Segoe UI Light", 0, 14)); // NOI18N
        jTableCrearHorario.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {"7:00 - 8:00", null, null, null, null, null, null, null},
                {"8:00 - 9:00", null, null, null, null, null, null, null},
                {"9:00 - 10:00", null, null, null, null, null, null, null},
                {"10:00 - 11:00", null, null, null, null, null, null, null},
                {"11.00 - 12:00", null, null, null, null, null, null, null},
                {"12:00 - 13:00", null, null, null, null, null, null, null},
                {"13:00 - 14:00", null, null, null, null, null, null, null},
                {"14:00 - 15:00", null, null, null, null, null, null, null},
                {"15:00 - 16:00", null, null, null, null, null, null, null},
                {"16:00 - 17:00", null, null, null, null, null, null, null},
                {"17:00 - 18:00", null, null, null, null, null, null, null},
                {"18:00 - 19:00", null, null, null, null, null, null, null},
                {"19:00 - 20:00", null, null, null, null, null, null, null},
                {"20:00 - 21:00", null, null, null, null, null, null, null},
                {"21:00 - 22:00", null, null, null, null, null, null, null}
            },
            new String [] {
                "Hora", "Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sábado"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPaneCrearHorario.setViewportView(jTableCrearHorario);
        jTableCrearHorario.getColumnModel().getColumn(0).setPreferredWidth(70);

        jButtonCrearHorario.setFont(new java.awt.Font("Segoe UI Light", 0, 14)); // NOI18N
        jButtonCrearHorario.setText("Crear Horario");
        jButtonCrearHorario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonCrearHorarioActionPerformed(evt);
            }
        });

        jButton_Volver.setFont(new java.awt.Font("Segoe UI Light", 0, 14)); // NOI18N
        jButton_Volver.setText("Volver");
        jButton_Volver.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_VolverActionPerformed(evt);
            }
        });

        jList_Materias.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Materia 1", "Materia 2", "Materia 3", "Materia 4" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jScrollPane1.setViewportView(jList_Materias);

        buttonGroup_GruposDisponibles.add(jRadioButton1);
        jRadioButton1.setText("Grupo 1");

        buttonGroup_GruposDisponibles.add(jRadioButton2);
        jRadioButton2.setText("Grupo 2");

        buttonGroup_GruposDisponibles.add(jRadioButton3);
        jRadioButton3.setText("Grupo 3");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(336, 336, 336)
                .addComponent(jButton_Volver)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 126, Short.MAX_VALUE)
                .addComponent(jButtonCrearHorario)
                .addGap(155, 155, 155))
            .addComponent(jScrollPaneCrearHorario, javax.swing.GroupLayout.Alignment.TRAILING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(85, 85, 85)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jRadioButton1)
                    .addComponent(jRadioButton2)
                    .addComponent(jRadioButton3))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jRadioButton1)
                        .addGap(3, 3, 3)
                        .addComponent(jRadioButton2)
                        .addGap(3, 3, 3)
                        .addComponent(jRadioButton3)))
                .addGap(18, 18, 18)
                .addComponent(jScrollPaneCrearHorario, javax.swing.GroupLayout.PREFERRED_SIZE, 267, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonCrearHorario)
                    .addComponent(jButton_Volver))
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonCrearHorarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCrearHorarioActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonCrearHorarioActionPerformed

    private void jButton_VolverActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_VolverActionPerformed
        parent.cambiarPanel(predecesor);
    }//GEN-LAST:event_jButton_VolverActionPerformed

    private FramePrincipal parent;
    private JPanel predecesor;
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup_GruposDisponibles;
    private javax.swing.JButton jButtonCrearHorario;
    private javax.swing.JButton jButton_Volver;
    private javax.swing.JList jList_Materias;
    private javax.swing.JRadioButton jRadioButton1;
    private javax.swing.JRadioButton jRadioButton2;
    private javax.swing.JRadioButton jRadioButton3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPaneCrearHorario;
    private javax.swing.JTable jTableCrearHorario;
    // End of variables declaration//GEN-END:variables
}
